Method and an apparatus to read a barcode

ABSTRACT

The invention relates to a method of reading a machine-readable barcode including a pre-determined number of code elements, in particular bars and spaces, with a respective picture being taken by means of optical imaging of at least two adjacent and/or mutually overlapping part sections of the bar code, with the individual part sections each including a code element and the part sections including in sum all the code elements of the barcode, with the pictures being stored in a data store, and with the stored pictures or parts thereof being put together for the reconstruction of the information encoded by the barcode. The invention further relates to a corresponding apparatus.

The invention relates to a method of reading a machine-readable barcodeincluding a pre-determined number of code elements, in particular barsand spaces. The invention further relates to a corresponding apparatus.

Such methods and apparatuses for the machine reading of a barcodeprinted, for example, on a package are generally known. Generally, abarcode can be read using a contact pen or a laser scanner. It isfurthermore also known to read a barcode by means of a matrix camerawhich, unlike scanners, has no moving parts, but photo-sensitive CCDelements, with a picture of the barcode being able to be generated byoptical imaging.

It is, however, a disadvantage with such a matrix camera that it has alimited image field. This has the consequence that only those barcodescan be read by a matrix camera which completely fit into the image fieldof the matrix camera. In contrast, barcodes which project beyond theimage field of the matrix camera due to their size cannot be readcompletely and can thus not be decoded. A conventional size of the imagefield of a matrix camera amounts, for example, to 30 mm×40 mm.

It is the underlying object of the present invention to develop a methodand an apparatus of the initially named kind such that a barcodeexceeding the size of the image field of a matrix camera can also bedecoded by means of the matrix camera.

This object is satisfied in accordance with the invention, starting froma method of the initially named kind, in that a respective picture istaken by means of optical imaging of at least two part sections of thebarcode which are adjacent and/or overlap one another, with theindividual part sections each including at least one code element andthe part sections including in sum all the code elements of the barcode;in that the pictures are stored in a data store; and in that the storedpictures or parts thereof are put together for the reconstruction of theinformation encoded by the barcode.

The part of the object relating to the apparatus is satisfied, startingfrom an apparatus of the initially named kind, by a picture-takingapparatus for the taking of pictures by means of optical imaging of atleast two part sections of the barcode which are adjacent and/or overlapone another, with the individual part sections each including at leastone code element and the part sections including in sum all the codeelements of the barcode, by a data store for the storage of the picturesand a reconstruction unit for the putting together of the storedpictures or parts thereof for the reconstruction of the informationencoded by the barcode.

The invention is characterized in that the part sections of the barcodeto be read, in particular of a 1D or 2D barcode, are detected by meansof optical imaging, in particular photographically andtwo-dimensionally, are stored as pictures and the pictures aresubsequently put together to form an image of the barcode such that theinformation encoded by the barcode can be restored from the image of thebarcode. An image of the barcode is also to be understood as everypicture of the barcode which permits a complete reconstruction of theinformation encoded by the barcode. The image thus has to extend onlyover the whole running length of the barcode, but not over its wholeheight.

The part sections of the barcode each include at least one code element.In order for a code element to be enclosed by a part section of thebarcode, the code element does not have to be completely arranged insidethe part section. It is rather sufficient for a section of the codeelement encompassing the width of the code element to be arranged insidethe part section of the barcode. This in particular means that the codeelements do not have to be taken over their whole height for thereconstruction of the encoded information. All part regions togetherinclude all code elements of the barcode.

A major advantage of the invention consists of the fact that barcodescan also be read by means of a matrix camera or the like which werepreviously not able to be read completely, and thus were also not ableto be decoded, due to the limited image field of the matrix camera. Inparticular the module width of the barcode to be read, i.e. the width ofthe narrowest code element, can be increased. Barcodes with a largermodule width are less prone to insufficiencies on the printing of thebarcode and can therefore be read with greater reliability.

In accordance with an advantageous embodiment of the invention, thepictures are taken by means of a picture-taking apparatus, preferably acamera, in particular a linear camera or a matrix camera. With a camera,the reading distance can be set particularly easily by adjusting thefocal length of the lens. A camera is furthermore characterized by ahigh sensitivity with low-contrast barcodes. With a linear camera or amatrix camera, the barcode to be read is imaged optically on a linear ormatrix-shaped arrangement of CCD sensors. The barcode can in particularalso be illuminated by one or more LEDs of the camera.

It is furthermore proposed in accordance with the invention that thepictures are taken sequentially, in particular with a constant imagefrequency. It can hereby in particular be avoided that a plurality ofpicture-taking apparatuses are required for the taking of the pictures.When only one picture-taking apparatus is used, the apparatus for thereading of the barcode can be manufactured particularly cost-favorably.Generally, however, a plurality of picture-taking apparatuses can beused.

It is particularly advantageous for the barcode to be moved relative tothe picture-taking apparatus, in particular at a constant speed, for thetaking of the pictures. This is in particular of advantage when the barcode moves through the image field of the picture-taking apparatus inthis process. Adjacent and/or mutually overlapping part sections of thebarcode can hereby be taken in a particularly simple manner. The barcodecan, for example, be moved relative to the picture-taking apparatus bymeans of a conveyor belt.

In accordance with a particularly preferred embodiment of the invention,on the putting together of the pictures or of the parts thereof, theirmutual relative positions are calculated from the image frequency of theshots and the speed of the barcode. With a constant image frequency fand a constant speed v, the shift Δs of the sequentially taken picturescan in particular be calculated from the ratio of the speed v and theimage frequency f: Δs∝v/f.

Additionally or alternatively, on the putting together of the picturesor of the parts thereof, their mutual relative positions can bedetermined by correlation of coinciding picture contents of the picturesor of the parts thereof. The image of the barcode can be generated inthis process by superimposing the coinciding picture contents of thepictures or of the parts thereof. A determination of the mutual relativepositions of the pictures or of the parts thereof by correlation ofcoinciding picture contents is preferably carried out when the speed ofthe barcode and/or the image frequency of the shots is only knownapproximately.

Additionally or alternatively, on the putting together of the picturesor of the parts thereof, their mutual relative positions can bedetermined by a comparison of the picture positions at least of start,stop and/or center marks of the barcode. The putting together of thepictures or of the parts thereof or the correlation of coincidingpicture contents is, however, not limited to the use of specific start,stop and/or center marks of the barcode. On the putting together or onthe correlation, the actual code elements can also be made use of bywhich the relevant information is actually encoded. These code elementscan be used alternatively or additionally to the specific start, stopand/or center marks of the barcode on the putting together or on thecorrelation. The pictures or the parts thereof can be put together toform the image of the barcode by superimposition of the picturepositions of e.g. the start, stop and/or center marks. The picturepositions, e.g. the start, stop and/or center marks, are preferably usedfor the determination of the mutual relative positions of the picturesor of the parts thereof when the speed of the barcode and/or the imagefrequency of the shots is at least largely unknown.

In accordance with a further preferred embodiment of the invention, thestored pictures or the parts thereof are put together in areconstruction buffer. The reconstruction buffer can be made as aseparate component or as part of the data store in which the pictures ofthe part sections of the barcode are stored.

Respective picture contents of the pictures extending along at least oneline are preferably put together for the reconstruction of theinformation encoded by the barcode. A line formed by image points of apicture in a row next to one another can in particular be orientatedperpendicular to the longitudinal extent of the code elements imaged inthe picture. Generally, however, the line used for the reconstructioncan have any desired angle with respect to the code elements. If thebarcodes are applied to conveyed objects and are read during theconveying of the objects, the line can extend parallel to the conveyingdirection, and indeed independently of the orientation of the barcoderelative to the conveying direction, i.e. it is deliberately accepted inthis version that the barcode extends obliquely to the conveyingdirection. Such a slanted positioning of the code elements relative tothe line used for the reconstruction is, however, completelyunproblematic for the invention. It is hereby made possible that onlyparts of the stored pictures have to be put together to be able to fullydecode the information encoded in the barcode so that in particular thereconstruction buffer requires less storage space. Furthermore,conventional algorithms, which are based, for example, on a scanningprocess of the barcode along a line can be used for the reconstructionof the barcode.

The pictures or the parts thereof can be stored and/or put together in acolor representation, a gray value representation or a binaryrepresentation. The pictures or the parts thereof available in a colorrepresentation or in a gray value representation can in particular beconverted into a binary representation. The required storage space andthe computing time requirements for the putting together of the picturescan hereby be reduced. Pictures in a color representation or a grayvalue representation can be present, for example, on the reading of 2Dbarcodes, in particular stack codes or matrix codes.

Picture contents of the pictures extending along a line and present in abinary representation can be encoded along the running length fornon-lossy data compression. On the putting together of the pictures orof the parts thereof, data sequences of the pictures encoded along therunning length can in particular be superimposed.

Further advantageous features of the invention are recited in thedependent claims.

The invention will be explained in more detail in the following withreference to an embodiment and to the drawings; there are shown in them:

FIGS. 1 a-1 d a barcode which is moved through the image field of amatrix camera;

FIGS. 2 a-2 c a single frame sequence of the barcode of FIG. 1, with thepictures having been taken at different points in time;

FIG. 3 a put-together single-frame sequence of the pictures of FIG. 2;and

FIGS. 4 a-4 c the single-frame sequence of FIG. 2, with the picturecontents of the pictures extending along the lines shown being read.

FIG. 1 shows a 1D barcode 1 to be read which includes a pre-determinednumber of code elements 31, 33 of different widths. Both the linear bars31 and the spaces 33 present between the bars are called code elements31, 33 in this process. The barcode 1, which can be printed on apackage, is moved, for example by means of a conveyor belt (not shown),along a movement direction 3 through the image field 5 of a matrixcamera (not shown). FIGS. 1 a to 1 d show the barcode 1 at differentpoints in time of its movement which takes place at a constant speed v.The speed v can, however, also generally be variable. In contrast toFIG. 1, the barcode 1 can also be moved obliquely through the imagefield 5 of the matrix camera as long as the widths of all code elements31, 33 of the barcode 1 can be detected.

As can in particular be recognized with reference to FIG. 1 b, thebarcode 1 does not completely fit into the image field 5 of the matrixcamera due to its size, but rather its two ends 27, 29 project laterallybeyond the image field 5 of the matrix camera. In FIGS. 1 a and 1 c, thebarcode 1 is arranged with a respective one of its two ends 27, 29inside the image field 5. In FIG. 1 d, the barcode 1 has already leftthe image field 5 again.

FIGS. 2 a to 2 c show three pictures 7, 9, 11 of part sections of thebarcode 1 which were taken by means of the matrix camera at the pointsin time shown in FIGS. 1 a to 1 c. In FIG. 2 a, the fore-running end ofthe barcode 1, when considered in the movement direction 3, and an image13 of a front part section of the barcode 1 are detected. In FIG. 2 b,an image 15 of a central part section of the barcode 1 is detected. FIG.2 c shows the trailing end of the barcode 1, when considered in themovement direction 3, with an image 17 of a rear part section of thebarcode 1 being detected. Generally, however, only two or any number ofimages can also be taken. The pictures 7, 9, 11 taken by means of thematrix camera are stored in a data store.

In this process, for example, a bar 19 of the barcode 1 (FIG. 1) isassociated both with the front part section and with the middle partsection of the barcode 1. Accordingly, images 19′, 19″ of the bar 19 arecontained in the pictures 7, 9 (FIG. 2). A bar 21 of the barcode 1 (FIG.1), in contrast, is associated with both the rear part section and themiddle part section of the barcode 1, so that images 21′, 21″ arecontained in the pictures 9, 11 (FIG. 2).

As is shown in FIG. 3, for the reconstruction of the information encodedby the barcode 1, the pictures 7, 9, 11 are put together in areconstruction buffer (not shown) by means of a reconstruction unit (notshown), for example a microprocessor, to form a complete image of thebarcode 1, with the picture 9 or 11 being displaced with respect to thepicture 7 or 9 respectively by Δs₁ or Δs₂ in the x direction whichcorresponds to the movement direction 3 of the barcode 1. In FIG. 3, thepictures 7, 9, 11 are only offset with respect to one another in the ydirection for reasons of illustration.

The mutual displacement Δs₁ or Δs₂ of the sequentially taken pictures 7,9, or 9, 11 can be calculated with a constant and known speed v from theproduct of the speed v of the barcode 1 and of the time span t betweenthe two shots: Δs_(i)∝v_(i)×t_(i). Alternatively or additionally, thedisplacement Δs_(i) can also be determined by correlation of the imagesof those code elements 31, 33 which are imaged in both pictures 7, 9 or9, 11. As a rule, a plurality of code elements 31, 33 arranged in a rowand in particular including the code element 19 or 21 respectively arerequired for such a correlation. However, coinciding picture contentscan also be correlated which represent the surroundings of the barcode1.

The correlation of coinciding picture contents of the pictures 7, 9, 11can in particular be used for the fine correction of a mutual shiftΔs_(i) calculated, for example, from the product of a speed v of thebarcode 1 only known approximately and a time span t between the twoshots. Moreover, the shift Δs_(i) can also be determined by a comparisonof the picture positions of start, stop and/or center marks of thebarcode 1. Generally, the superimposing operation on the puttingtogether of the pictures 7, 9, 11 can consist of the averaging ofcorresponding pixels of the pictures 7, 9, 11.

In accordance with a further embodiment of the invention, as will beexplained in the following, unlike in FIG. 3, only parts of the pictures7, 9, 11 are put together to form an image of the barcode 1.

In FIGS. 4 a to 4 c, the pictures 7, 9, 11 of FIGS. 2 a to 2 c areshown. Picture contents, for example pixel sequences 25 of the pictures7, 9, 11, extending along one or more lines 23 are first read for thereconstruction of the information encoded by the barcode 1. The lines 23each extend perpendicular to the longitudinal extent of the codeelements 31, 33 imaged in the respective picture 7, 9, 11. Unlike inFIG. 4, the lines 23 can, however, also extend at different heightsthrough the pictures 7, 9, 11 and/or obliquely to the longitudinalextent of the imaged code elements 31, 33.

If the pixel sequences 25 read along the lines 23 are present in a coloror gray value representation, they can be converted into a binaryrepresentation. Pixel sequences 25 present in a binary representationcan be encoded by running length so that in particular the individualwidths of the code elements 31, 33 of the barcode 1 are present assequential numerical values.

For the reconstruction of the information encoded by the barcode 1,pixel sequences 25 read along one or more lines 23 are put together inthe reconstruction buffer already explained above to form an image ofthe barcode 1, with the encoded information being able to bereconstructed from the image of the barcode 1. An averaged image of thebarcode 1 can be generated with the aid of a plurality of lines 23.

The mutual shift of the pixel sequences 25 of the taken pictures 7, 9,11 read along the lines 23 can be calculated or determined in analogy tothe calculation or determination of the mutual shift of the takenpictures 7, 9 or 9, 11.

In the method in accordance with the invention, individual pictures 7,9, 11 of the barcode 1 or parts 25 thereof, in particular pixelsequences 25 arranged along a line 23, taken by means of a matrixcamera, are displaced with respect to one another and superimposed onone another in correct phase so that the barcode 1 can be fully decoded.

Reference Numeral List

-   1 barcode-   3 movement direction-   5 image field-   7, 9, 11 picture-   13, 15, 17 part section-   19 bar-   19′, 19″ image of a bar-   21 bar-   21′, 21″ image of a bar-   23 line-   25 pixel sequence-   27, 29 end of the barcode-   31, 33 code element

1. A method of reading a machine-readable barcode (1) including apre-determined number of code elements, in particular bars and spaces,characterized in that a respective picture (7, 9, 11) is taken by meansof optical imaging of at least two adjacent and/or mutually overlappingpart sections (13, 15, 17) of the barcode (1), with the individual partsections (13, 15, 17) each including at least one code element and thepart sections (13, 15, 17) including in sum all code elements of thebarcode (1); in that the pictures (7, 9, 11) are stored in a data store;and in that the stored pictures (7, 9, 11) or parts (25) thereof are puttogether for the reconstruction of the information encoded by thebarcode (1).
 2. A method in accordance with claim 1, characterized inthat the pictures (7, 9, 11) are taken by means of a picture-takingapparatus, preferably a camera, in particular a linear camera or amatrix camera.
 3. A method in accordance with claim 1, characterized inthat the pictures (7, 9, 11) are taken sequentially, in particular at aconstant image frequency.
 4. A method in accordance with claim 2,characterized in that the barcode (1) is in particular moved at aconstant speed relative to the picture-taking apparatus for the takingof the pictures (7, 9, 11).
 5. A method in accordance with claim 3,characterized in that the barcode (1) is in particular moved at aconstant speed relative to the picture-taking apparatus for the takingof the pictures (7, 9, 11).
 6. A method in accordance with claim 5,characterized in that, on the putting together of the pictures (7, 9,11) or of the parts (25) thereof, their mutual relative positions arecalculated from the image frequency of the shots and the speed of thebarcode (1).
 7. A method in accordance with claim 1, characterized inthat, on the putting together of the pictures (7, 9, 11) or of the parts(25) thereof, their mutual relative positions are determined bycorrelation of coinciding picture contents of the pictures (7, 9, 11) orof the parts (25) thereof.
 8. A method in accordance with claim 1,characterized in that, on the putting together of the pictures (7, 9,11) or of the parts (25) thereof, their mutual relative positions aredetermined by a comparison of the picture positions at least of start,stop and/or center marks of the barcode (1).
 9. A method in accordancewith claim 1, characterized in that the stored pictures (7, 9, 11) orthe parts (25) thereof are put together in a reconstruction buffer. 10.A method in accordance with claim 1, characterized in that respectivepicture contents of the pictures (7, 9, 11) extending along at least oneline (23) are put together for the reconstruction of the informationencoded by the barcode (1).
 11. A method in accordance with claim 1,characterized in that the pictures (7, 9, 11) or the parts (25) thereofare stored and/or put together in a color representation, a gray valuerepresentation or a binary representation.
 12. A method in accordancewith claim 11, characterized in that the pictures (7, 9, 11) or theparts (25) thereof available in a color representation or in a grayvalue representation are converted into a binary representation.
 13. Amethod in accordance with claim 1, characterized in that image contentsof the pictures (7, 9, 11) extending along a line (23) and present in abinary representation are encoded by running length.
 14. An apparatusfor the reading of a machine-readable barcode (1) including apre-determined number of code elements, in particular bars and spaces,characterized by a picture-taking apparatus for the taking of pictures(7, 9, 11) by means of optical imaging of at least two adjacent and/ormutually overlapping part sections (13, 15, 17) of the barcode (1), withthe individual part sections (13, 15, 17) each including at least onecode element and the part sections (13, 15, 17) including in sum allcode elements of the barcode (1); a data store for the storage of thepictures (7, 9, 11); and a reconstruction unit for the putting togetherof the stored pictures (7, 9, 11) or of parts (25) thereof for thereconstruction of the information encoded by the barcode (1).
 15. Anapparatus in accordance with claim 14, characterized in that thepicture-taking apparatus is a camera, in particular a linear camera or amatrix camera.